package finedev.work.vennue;

import android.os.Bundle;
import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.view.Menu;
import android.widget.TabHost;

public class MainTabActivity extends TabActivity {

	@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        Utility.mAsyncFacebookRunner = new AsyncFacebookRunner( Utility.mFacebook );

        final TabHost tabHost = getTabHost();

        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator( getString(R.string.str_friend_kor) )
                .setContent(new Intent(this, FriendActivity.class)
                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));

        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator( getString(R.string.str_newvideo_kor) )
                .setContent(new Intent(this, VideoActivity.class)
                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
        
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator( getString(R.string.str_me_kor) )
                .setContent(new Intent(this, MyActivity.class)
                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main_tab, menu);
        return true;
    }
}
